Repository navigation
fix(interpreter): loop/return scoping, trap listings, [[ ]] operands and builtin parity from the BashBox corpus - #2629
Merged
Conversation
…sign errors (WIP)
…-d '' parity (WIP)
…and regex errors, unset options (WIP)
…e subscripts (WIP)
…ource spec cases follow bash
…-eafupr-bb-core # Conflicts: # crates/bashkit/src/interpreter/mod.rs # knowledge/log.md
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | b8185f8 | Commit Preview URL Branch Preview URL |
Oct 08 2026, 02:41 AM |
…-eafupr-bb-core # Conflicts: # knowledge/log.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Михайло · project thread
What changed
Interpreter-core behavior now matches bash 5.2 in the areas the BashBox corpus covers:
return:break/continuenever leave a caller's loop and warn outside one; a non-numeric count exits with 128.returnwith no argument returns$?and ends a sourced file.${x!}and${}report "bad substitution",${1:=x}reports "cannot assign in this way"; both abandon the line.$?.trapnormalises signal names (0is EXIT,int/SIGINT), rejects unknown names, and lists in bash order with re-readable quoting.aliasand a baresetuse the same quoting.[[ ]]:-eq/-ltoperands are evaluated as arithmetic; an invalid=~regex returns 2.unset: options only before the first name, bad options exit 2,-fwith-vis an error, readonly elements are refused.getoptsalways writesOPTIND(starts at 1);builtin catsays "not a shell builtin";hashandsourceerror statuses;pushd/dirsshow~;read -d ''splits on NUL;set -k;a[-5]=xbefore the start is a bad subscript.Why
BashBox corpus batch: 47 of the 48 skipped cases in
bashbox-interpreter-core.test.shnow pass. The one left needs ENOTDIR for a path under a regular file in the VFS; its skip reason says so.Before / After
Risk
break/continue/returndepth tracking) touches every loop and function call. Merged with fix(builtins): return, unset -v and read reject bad arguments #2613 (returnoutside a function) and feat(interpreter): deliver signals the shell sends itself #2608 (signal traps); both sets of tests pass.function_recursion_is_bounded_on_a_two_mib_stackstill passes.type.test.shandsource.test.shexpectations now follow bash, with theirbash_diffmarkers removed.Checklist
Generated by Claude Code